<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>合同模板管理</title>
<%@ include file="/WEB-INF/jsp/common/common.jsp"%>
<link href="${prcs}/css/def/ztree/metro.css" rel="stylesheet">
<link href="${prcs}/css/def/bootstrap/ace/ace-part2.min.css"
	rel="stylesheet">
<link href="${prcs}/css/def/bootstrap/ace/ace.css" rel="stylesheet">
<link href="${prcs}/css/def/frm/common/common.css" rel="stylesheet">
<script
	src="${pageContext.request.contextPath}/resource/js/jquery/plugin/handlebars-v3.0.1.js"></script>
<script
	src="${pageContext.request.contextPath}/resource/js/jquery/plugin/My97DatePicker/WdatePicker.js"></script>
<script
	src="${pageContext.request.contextPath}/resource/js/jquery/plugin/ajaxfileupload.js"></script>
<script
	src="${pageContext.request.contextPath}/resource/js/layer/layer.min.js"></script>
<script type="text/javascript">
		menuType="${menuType}";
</script>
</head>
<body>
	<div class="head-title">
		<span>合同模板管理</span>
	</div>
	<div class="container-fluid" id="searchContent">
		<div class="row">
			<form class="form-inline" method="post" id="contractMngForm">
				<div class="input-group col-md-3 free-3">
					<span class="input-group-addon">模板名称:</span> <input type="text"
						class="form-control" id="qryContractName" name="qryContractName"
						size="30px" />
				</div>
				<div class="div-button col-md-pull-3">
					<%-- <shiro:hasPermission name="sysDemoController/searchData4Page"> --%>
					<a type="button" class="btn btn-info" onclick="serarchContract();"><i
						class="ace-icon glyphicon glyphicon-search"></i>查询</a> 
					<c:if test="${menuType==0}">
						<a type="button" class="btn btn-info" data-toggle="modal"
							data-target="#uploadContModal"><i
							class="ace-icon glyphicon glyphicon-search"></i>上传</a>
					</c:if>
				</div>
			</form>
		</div>
		<hr />
		<div class="row">
			<table id="contractMngTable" class="display table table-bordered"
				cellspacing="0" width="100%">
			</table>
		</div>
	</div>

	<div class="modal fade" id="uploadContModal" tabindex="-1"
		role="dialog" aria-labelledby="uploadContModal" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<div class="head-title">
						<span>上传合同模板</span>
					</div>
				</div>
				<div class="modal-body">
					<div class="row">
						<div class="form-group col-sm-12">
							<div class="input-group">
								<span class="input-group-addon">合同模板名称<span
									class="notNull">*</span></span> <input type="text" id="contractName"
									name="contractName" class="form-control" placeholder="合同模板名称">
							</div>
						</div>
						<div class="form-group col-sm-12">
							<div class="input-group">
								<span class="input-group-addon">合同模板文件<span
									class="notNull">*</span></span> <input type="file" id="myfile"
									name="myfile" class="form-control" placeholder="合同模板文件">
							</div>
						</div>
						<div class="form-group col-sm-12">
							<div class="input-group">
								<span class="input-group-addon">备注</span> <input type="text" id="remark"
									name="remark" class="form-control" placeholder="备注">
							</div>
						</div>
					</div>
				</div>
				<div style="display: none">
					<iframe id="_url" width="100%"  src="" style="min-height: 270px;overflow:auto;border-top-width: 0px;"></iframe>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭
					</button>
					<button type="button" class="btn btn-primary" onclick="uploadContractTmp()">提交</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
	</div>
</body>
<script
	src="${pageContext.request.contextPath}/resource/js/gacx/contractmng/contractmng.js"></script>
</html>